import { ref } from 'vue'

export default function () {

  const current = ref(1)
  function handleScroll(cont) {
    const container = cont
    if (container.target?.scrollTop + container.target?.clientHeight >= container.target?.scrollHeight - 1) {
      console.log('到底了');
      current.value++
      console.log(current.value);
    }
  }

  return {
    handleScroll,
    current
  }
}
